1. Field of the Invention
This invention generally relates to video compression, and more specifically, the invention relates to a method and system for selecting between a plurality of compression modes in a video encoder. Even more specifically, the preferred embodiment of the invention relates to such a method and system for use in a Wyner-Ziv video encoder.
2. Background Art
Encoder mode selection is an important problem in video compression systems. In general, video compression systems employ a plurality of modes such as independent coding modes (conventionally termed Intra modes), differentially predicted codes (conventionally termed Inter modes), skip coding modes etc. Given a video frame to be compressed, a conventional video encoder typically selects the best encoding mode to be used for each block of pixels or transform coefficients in the video frame. The encoder mode for each block is selected with the aim of providing the best compression performance, i.e. the minimum compression rate and/or the best reconstruction quality. Wyner-Ziv video encoders differ from conventional differential pulse code modulation (DPCM) based video encoders in that encoding are typically performed on large coefficient vectors rather than on blocks of coefficients. Further the rate required to compress any component coefficient of this vector depends on the global probability distribution of the entire probability vector.
Previous methods for mode selection in DPCM encoders fall into two main categories. The first class of methods, shown in FIG. 1, employs multiple encoder runs for each block, using each of the available encoding modes. This involves, at 102 and 104, transform coding, quantization, and entropy coding of the block using each available encoding mode. After encoding, the compression rate and reconstruction distortion for each encoding mode are computed at 112 and 114. Typically, these are combined to form a Lagrangian (R+λD) which can be computed for each mode. The encoded mode selected at 122 is, then, the mode which minimizes the Lagrangian. Examples of this class of solutions include the method implemented in the rate-distortion optimized H.264 reference encoder, as well as the methods described in U.S. patent application Ser. No. 2006/0182174A1: ‘Method for coding mode selection of intra prediction in video compression’, U.S. Pat. No. 6,975,680B2: ‘Macroblock mode decision biasing for video compression systems’, and U.S. Pat. No. 7,194,035: ‘Method and apparatus for improved coding mode selection’. The main shortcomings of these approaches are the high computational complexity. In fact, these approaches are computationally infeasible for vector-based encoding as used in Wyner-Ziv encoders, since these would require encoding of each possible combination of modes for the entire vector (and thus complexity would be exponential in the length of the vector).
The second class of methods, shown in FIG. 2, eliminate the need for multiple encodings by evaluating, at 202 and 204, certain mode-dependent functions (termed features) on each block. Typically, these are energy-measuring functions such as the sum of absolute (transform) differences, block intensity/transform variance, and sum of absolute values of subsets of frequency coefficients. Examples of this class of solutions include the method implemented in the SATD optimized H.264 reference encoder, as well as the methods described in U.S. Pat. No. 6,144,769: ‘Video coding device and decoding device’, U.S. Pat. No. 6,167,162: ‘Rate-distortion optimized coding mode selection for video coders’, U.S. patent application Ser. No. 2003/0086495A1, ‘Method and system for optimizing mode selection for video coding’, and U.S. patent application Ser. No. 2005/0249277A1: ‘Method and apparatus to determine prediction modes to achieve fast video encoding.’ The main shortcoming of these approaches in the context of Wyner-Ziv video encoders is that they are not suited to making mode selection decisions between multiple Wyner-Ziv modes. This is a result of the fact that these approaches ignore the global Wyner-Ziv encoded vector probability distribution during the mode selection process.
Therefore, a need exists for an improved method for mode selection for a Wyner-Ziv video encoder, which requires low computational complexity, and which provides high compression efficiency by accounting for the global probability distribution.